import React, { Component } from 'react'
import { BrowserRouter, Route } from 'react-router-dom'
import { Provider } from 'react-redux'
import store from './store'
import Header from './components/header'
import Home from './components/home'
import Login from './components/login'
import Detail from './components/detail/loadable'

class App extends Component {
  render () {
    return (
      <Provider store={store}>
       <BrowserRouter>
        <div>
          <Header /> 
          <Route exact path="/" component={Home} />
          <Route exact path="/login" component={Login} />
          <Route exact path="/detail/:id" component={Detail} />
        </div>
       </BrowserRouter>
      </Provider>
    )
  }
}

export default App
